package cn.lyq.card.ui.course

import cn.lyq.card.base.SimpleVM
import cn.lyq.card.data.model.CourseTypeInfo


class CourseVM : SimpleVM() {

    val pageSize = 15
    val mTypeList = mutableListOf<CourseTypeInfo>()

    fun getType() = simpleEmit {
        repository.courseService.getCourseType()
    }

    fun getCashRecord(page: Int, index: Int) = simpleEmit {
        repository.courseService.getCourseList(page, pageSize, mTypeList[index].courseTypeId)
    }
}